package com.houger.ddd.seckill.template.config;

import com.houger.ddd.seckill.template.SecKillTemplate;
import com.houger.ddd.seckill.template.holder.BeanHolder;
import jakarta.annotation.Resource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Houger.
 * @date 2024年05月27日 14:43.
 */
@Configuration
public class ActivityConfig {

    @Resource
    private BeanHolder beanHolder;

    @Bean
    public SecKillTemplate secKillTemplate (){
        final SecKillTemplate secKillTemplate = new SecKillTemplate();
        secKillTemplate.setBeanHolder(beanHolder);
        return secKillTemplate;
    }

}
